;; import lists/assoc.scm logic/lifetimes.scm

(define life-test-1
  '((a . ())
    (b . (a))
    (c . (b))
    (d . (c))))

(define life-test-2
  '((a . ())
    (b . ())
    (c . ())
    (d . (a b c))))

(define life-test-3
  '((a . ())
    (b . ())
    (c . (a b c))
    (d . ())
    (e . ())
    (f . (d e f))))

(define life-test-4
  '((x . ())
    (a . ())
    (b . ())
    (c . (a b c))
    (d . ())
    (e . ())
    (f . (d e f x))))

(define (go test)
  (print test)
  (for-each print (lifetime-analysis test))
  (newline))

(go life-test-1)
(go life-test-2)
(go life-test-3)
(go life-test-4)
